package com.shushan.pages.bean;

import com.android.net.bean.NetBaseBean;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * @ClassName: TopicBean
 * @Desciption: 专题详情bean
 * @author: yichaohua
 * @date: 2018-04-23
 */
public class TopicBean extends NetBaseBean {

    public int id;
    public int outline_id;
    public String title;
    public String description;
    public String cover;
    public int exercises_num;
    public int video_id;
    public int subject_id;
    public int teacher_id;
    public String teacher_name;

    @Override
    public void initByJson(JSONObject jsonObject) throws JSONException {
        id = jsonObject.optInt("id",0);
        outline_id = jsonObject.optInt("outline_id",0);
        title = jsonObject.optString("title","");
        description = jsonObject.optString("description","");
        cover = jsonObject.optString("cover","");
        exercises_num = jsonObject.optInt("exercises_num",0);
        video_id = jsonObject.optInt("video_id",0);
        subject_id = jsonObject.optInt("subject_id",0);
        teacher_id = jsonObject.optInt("teacher_id",0);
        teacher_name = jsonObject.optString("teacher_name","");
    }
}
